package com.ruyuan.eshop.common.dao.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruyuan.eshop.common.dao.GoodsSnapshotDAO;
import com.ruyuan.eshop.common.domain.entity.GoodsSnapshotDO;
import com.ruyuan.eshop.common.mapper.GoodsSnapshotMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 交易快照DAO
 * @author pwd
 * @version 1.0
 */
@Repository
public class GoodsSnapshotDAOImpl extends ServiceImpl<GoodsSnapshotMapper, GoodsSnapshotDO> implements GoodsSnapshotDAO {

    @Autowired
    private GoodsSnapshotMapper goodsSnapshotMapper;

    /**
     * 根据id修改point值
     * @param point 商品使用积分
     * @param snapshotId 交易快照id
     */
    @Override
    public void updatePointById(Integer point, Long snapshotId) {
        goodsSnapshotMapper.updatePointById(point, snapshotId);
    }
}
